import {httpRequest} from "../request";

module.exports = {

  getUserSignClient: () => {
    return httpRequest({
      'url': '/signClient/getUserSignClient',
      'method': 'get',
      'params': {
        userId: wx.getStorageSync('userInfo')?.id || ''
      }
    });
  },
  
  saveUserSignClient: (params) => {
    return httpRequest({
      'url': '/signClient/saveUserSignClient',
      'method': 'post',
      'params': params
    });
  },

  queryByCondition: (params) => {
    return httpRequest({
      'url': '/signClient/queryByCondition',
      'method': 'post',
      'params': params
    });
  },

  updateOpenFlag: (params) => {
    return httpRequest({
      'url': '/signClient/updateOpenFlag',
      'method': 'post',
      'params': params,
      'header': {
        'Content-Type': 'application/x-www-form-urlencoded' 
      }
    });
  },

  invalid: (params) => {
    return httpRequest({
      'url': '/signClient/invalid',
      'method': 'get',
      'params': params
    });
  },

  judgeClientNameIsExist: (params) => {
    return httpRequest({
      'url': '/signClient/judgeClientNameIsExist',
      'method': 'get',
      'params': params
    });
  }

}